package com.vondear.rxui.view.dialog;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.vondear.rxui.R;


/**
 * 
 * @date 2016/7/19
 * Mainly used for confirmation and cancel.
 */
public class RxDialogCaiLiaoYaoQiu extends RxDialog {

    private ImageView mClose;
    private TextView tvContent;
    private TextView titleTv;

    public RxDialogCaiLiaoYaoQiu(Context context, int themeResId) {
        super(context, themeResId);
        initView();
    }

    public RxDialogCaiLiaoYaoQiu(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
        initView();
    }

    public RxDialogCaiLiaoYaoQiu(Context context) {
        super(context);
        initView();
    }

    public RxDialogCaiLiaoYaoQiu(Activity context) {
        super(context);
        initView();
    }

    public RxDialogCaiLiaoYaoQiu(Context context, float alpha, int gravity) {
        super(context, alpha, gravity);
        initView();
    }

    public TextView getTvContent(){
        return tvContent;
    }

    public TextView getTitleTv() {
        return titleTv;
    }

    public void setCloseLinstener(View.OnClickListener linstener){
        mClose.setOnClickListener(linstener);
    }

    private void initView() {
        View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_cailiaoyaoqiu, null);
        mClose = (ImageView) dialogView.findViewById(R.id.closeBtn);
        tvContent = (TextView) dialogView.findViewById(R.id.tvContent);
        titleTv = (TextView) dialogView.findViewById(R.id.titleTv);
        setContentView(dialogView);
    }
}
